<?php 
	$userId = $_GET['userID'];
		
	$DSN = 'mysql:dbname=user;host=127.0.0.1;port=3306;charset=UTF8';
	$pdo = new PDO($DSN, 'root', '68097777!@#');

	$state = $pdo->prepare("SELECT count(*) as count FROM `users` WHERE id = ?");
	$state->bindValue(1, $userId, PDO::PARAM_STR);
	if($state->execute()){
		$fetch = $state->fetch(PDO::FETCH_ASSOC)['count'];
		if($fetch >= 1){
			exit(json_encode(['status' => true]));
		}
		exit(json_encode(['status' => false, 'error_code' => 1]));
	}else{
		exit(json_encode(['status' => false, 'error_code' => 2]));
	}
 ?>